#ifndef _Cpu
#define _Cpu

#include <process.h>
#include "Wmi.h"
#include "Log.h"


// used to start thread, thread parameters
struct cpu_params {
	Wmi wmi;
	Log *log;
	int cpu;
	int threads_allowed;

	bool isOn;	// switch on/off watching the cpu
	bool end;	// if the thread is shutting down
};

class Cpu {
public:
	struct cpu_params params;

	// Constructor
	Cpu(Log* /*log*/);

	// returns the last cpu average across all cores
	int getPercent();
	// start watching the cpu average
	void start();
	// pause watching the cpu, when nothing is being processed
	void pause();
};

#endif // _Cpu